<html>
<body>
Reports calls to
<code>java.util.Random.nextDouble()</code> that are used to create a positive integer number by multiplying
the call by a factor and casting to an integer.
<p>
  For generating a random positive integer in a range,
  <code>java.util.Random.nextInt(int)</code> is simpler and more efficient.
</p>
<p><b>Example:</b></p>
<pre><code>
  int getRandomInt() {
    return (int) ((new Random()).nextDouble() * SIZE);
  }
  </code>
</pre>
<p>After the quick-fix is applied:</p>
<pre><code>
  int getRandomInt() {
    return (new Random()).nextInt(SIZE);
  }
</code></pre>
<!-- tooltip end -->

</body>
</html>